<?php
class Mprofile extends CI_Model{

    public function __construct(){
        parent::__construct();        
        $this->load->database();
    }
    public function listall(){
    	$this->db->cache_on();
        $query=$this->db->query("SELECT * FROM tbl_user ORDER BY id DESC LIMIT 1");
        return $query->result_array();
    }

    public function update($parram){    	
    	try{

    		$this->db->update("user", $parram);	
			return 0;
    	}catch(Exception $e){
 			throw new Exception();
 			return 1;
    	}
		
    }

}